//
//  Commodity.m
//  FMDB_Demo_Login
//
//  Created by libertyair on 15/5/29.
//  Copyright (c) 2015年 libertyair. All rights reserved.
//

#import "Commodity.h"

@implementation Commodity

- (instancetype)initWithName:(NSString *)name number:(NSInteger)number sPrice:(CGFloat)sPrice iPrice:(CGFloat)iPrice category:(NSString *)category
{
    if (self = [super init])
    {
        self.name = name;
        self.number = number;
        self.sPrice = sPrice;
        self.iPrice = iPrice;
        self.category = category;
    }
    return self;
}

+ (instancetype)commodityWithName:(NSString *)name number:(NSInteger)number sPrice:(CGFloat)sPrice iPrice:(CGFloat)iPrice category:(NSString *)category
{
    return [[Commodity alloc]initWithName:name number:number sPrice:sPrice iPrice:iPrice category:category];
}

@end
